
package fileby.util.properties;

import com.google.inject.Singleton;
import java.io.IOException;

/**
 *
 * @author Ludwig Kjellstrom
 */
@Singleton
public class PropertyBundleFactory implements IPropertyBundleProvider{

    public PropertyBundle create(Class clazz){
        try {
            return new PropertyBundle(clazz);
        } catch (IOException ex) {
            System.err.println("PropertiesBundleFactory: Could not find properties for " + clazz.getName());
        }
        return null;
    }

    public PropertyBundle createGlobalBundle() {
        try {
            return new PropertyBundle();
        } catch (IOException ex) {
            System.err.println("PropertiesBundleFactory: Could not find common properties");
        }
        return null;
    }

}
